package com.lzw.breezeNovel.model.entity.pojo.user;

import com.lzw.breezeNovel.model.entity.pojo.BaseEntity;
import com.lzw.breezeNovel.model.enums.user.BaseStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.model.entity
 * @date 2025/3/2
 * @description 用户信息表
 */
@Data
@Schema(description = "用户信息表")
@SuppressWarnings("all")
public class UserInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "手机号码")
    @NotNull(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3|4|5|6|7|8|9][0-9]\\d{8}$", message = "手机号码格式错误")
    private String phone;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "昵称")
    @NotNull(message = "昵称不能为空")
    private String username;

    @Schema(description = "头像url")
    private String avatar;

    @Schema(description = "账号状态")
    private BaseStatus status;

    @Schema(description = "余额")
    private BigDecimal balance;

    @Schema(description = "性别")
    @NotNull(message = "性别不能为空")
    private Integer gender;

    @Schema(description = "简介")
    private String bio;

    @Schema(description = "粉丝数")
    private Long fan;

    @Schema(description = "关注数")
    private Long attention;

    @Schema(description = "喜爱小说的类型")
    private String likeBook;

    @Schema(description = "真实姓名")
    private String realName;

    @Schema(description = "账号是否被锁")
    private Integer lockAccount;

    @Schema(description = "用户的点赞")
    private Long like;


}